<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>信息详情</title>
<style type="text/css">
	*{
		margin: 0px;
		padding: 0px;
	}
	#div_boss{
		width: 1920px;
		height: 1080px;
		background:url("/bbs/img/login_bg.png");
		position: absolute;
	}
	#head_div{
		width: 650px;
		height: 30px;
		font-size:23px;
		position: absolute;
		margin-top: 50px;
		margin-left: 1200px;
	}
	#head_div1{
		width:100px;
		height: 30px;
		text-align: center;
		position: absolute;
		margin-left: 0px;
		
	}
	#head_div2{
		width:150px;
		height: 30px;
		font-size:20px;
		text-align: center;
		position: absolute;
		margin-left: 100px;
	}
	#head_div3{
		width:100px;
		height: 30px;
		text-align: center;
		position: absolute;
		margin-left: 250px;
	}
	#head_div4{
		width:150px;
		height: 30px;
		text-align: center;
		position: absolute;
		margin-left: 350px;
	}
	#head_div5{
		width:150px;
		height: 30px;
		text-align: center;
		position: absolute;
		margin-left: 500px;
	}
	.head_span:hover{
		cursor: pointer;
		font-size:25px;
		color: cornflowerblue;
	}
	#title{
		width: 300px;
		height:66px;
		font-family: Microsoft YaHei UI, Microsoft YaHei UI-Bold;
		font-weight: 550;
		font-size:50px;
		margin-top: 100px;
		margin-left: 410px;
		position: absolute;
	}
	#readmsg_div{
		width:800px;
		height:400px;
		opacity: 0.9;
		background: #efeff0;
		border-radius: 5px;
		font-size:23px;
		margin-top: 190px;
		margin-left: 410px;
		position: absolute;
	}
	#sendUname_div1{
		height:40px;
		width:800px;
		border-radius: 5px 5px 0px 0px;
		background-color:lightcyan;
		position: absolute;
	}
	#form_div{
		height:30px;
		width:70px;
		margin-top: 5px;
		margin-left: 5px;
		position: absolute;
	}
	#sendname{
		height:30px;
		width:70px;
		font-size:20px;
		margin-top: 10px;
		margin-left: 90px;
		position: absolute;
	}
	#returnmsg_div2{
		width:800px;
		height:323px;
		background-color: honeydew;
		font-size:20px;
		margin-top: 40px;
		position: absolute;
	}
	#detail{
		height:24px;
		font-size:18px;
		width:800px;
		color:gray;
		position: absolute;
	}
	#note_div{
		height:260px;
		width:800px;
		margin-top: 30px;
		position: absolute;
	}
	#returnMsg{
		width: 55px;
		height: 27px;
		font-size:18px;
		margin-top: 290px;
		margin-left: 680px;
		position: absolute;
	}
	#returnMsg:hover{
		cursor: pointer;
		color: cornflowerblue;
		font-size:20px;
	}
	#delMsg{
		width: 55px;
		height: 27px;
		font-size:18px;
		margin-top: 290px;
		margin-left: 740px;
		position: absolute;
	}
	#delMsg:hover{
		cursor: pointer;
		color: cornflowerblue;
		font-size:20px;
	}
	#readmsg_div3{
		font-size:17px;
		color:gray;
		margin-top:370px;
		margin-left:610px;
		position: absolute;
	}
</style>
<script type="text/javascript" src="/bbs/js/jquery-1.11.2.min.js"></script>
<script type="text/javascript">
	$(function(){
		//获取用户登录信息
		getUser();
		//获取信息内容
		getMsgNode();
	})
	function getUser(){
		$.post("getUser.json",{"opt":"selectUser"},function(data){
			$("span:eq(0)").html(data.uname);
		},"json");
	}
	function exit() {
		$.post("exit.json",{"opt":"exit"},function(data){
			location.href = "/bbs/index.html";
		},"text");
	}
	function listMsg() {
		location.href = "/bbs/login_succ/listMsg.html";
	}
	function sendMsg() {
		location.href = "/bbs/login_succ/sendMsg.html";
	}
	function getMsgNode(){
		$.post("showOneMsg.mess",{"opt":"showOneMsg"},function(data){
			console.log(data);
			$("#sendUname_div1").html("<div id='form_div'>来自:</div>"+"<div id='sendname'>"+data.sendUname+"</div>")
			$("#note").html(data.note);
			$("#sendtime").html("["+data.sendTime+"]");
		},"json");
	}  
	function returnMsg(){
		location.href = "/bbs/login_succ/returnMsg.html";
	}
	function delMsg(){
		var msg = "确定删除？";  
        if (confirm(msg)==true){  
            $.get("deleteOneMsg.mess",{"opt":"deleteOneMsg"},function(){
            	location.href = "/bbs/login_succ/listMsg.html";
            },"text") 
        }else{  
            return false;  
        }  
	}
</script>
</head>
<body>
	<div id="div_boss">
		<div id="head_div">
			<div id="head_div1">当前用户</div>
			<div id="head_div2"><span></span></div>
			<div id="head_div3"><span class="head_span" onclick="exit()">[登出]</span></div>
			<div id="head_div4"><span class="head_span" onclick="listMsg()">[信息列表]</span></div>
			<div id="head_div5"><span class="head_span" onclick="sendMsg()">[发送信息]</span></div><br>
		</div>
		<div id="title">阅读短信息</div>
		<form>
			<div id="readmsg_div">
				<div id="readmsg_div1">
					<div id="sendUname_div1"></div>
					
				</div>
				<div id="returnmsg_div2">
					<div id="detail">[详细内容]</div>
					<div id="note_div">&emsp;&emsp;<span id="note"></span></div>
					<div id="returnMsg" onclick="returnMsg()">[回复]</div>
					<div id="delMsg" onclick="return delMsg()">[删除]</div>
				</div>
				<div id="readmsg_div3"><span id="sendtime"></span></div>
		</div>
		</form>
	</div>	
</body>
</html>